/**
 * Inject dependanceies into index.html, HTML TASK
 * @Author: jiangcheng198745@hotmail.com
 * @Date: 2016/07/06
 */
'use strict';

import gulp from 'gulp';
import {argv as args} from 'yargs';
import _ from 'lodash';
import runSeq from 'run-sequence';


gulp.task('dist', (done) => {
    let distTask = [
        'build', [
            'image-min',
            'optimize',
            'copy:dist'
        ]
    ];

    if (args.nobuild) {
        _.pull('build');
    }

    runSeq.apply(this, distTask);
});